#include "Unit.h"
#include "../phy/Phycccp.h"
#include "../gfx/RenderEngine.h"
#include "../shared/utils.h"
#include <string>
namespace Putin{

Unit::Unit(void)
{
	mConstants = new DynamicObjectConstants;
	mState = IDLE;
	mIsShooting = false;
}

Unit::~Unit(void)
{
	//delete mConstants;
}

std::pair<Vec3f,Vec3f> Unit::getAABB()
{
	std::string sid = Utils::intToString(getID());
	Ogre::AxisAlignedBox box = RenderEngine::instance().getUnitAABB( sid);
	Ogre::Vector3 vMin = box.getMinimum();
	Ogre::Vector3 vMax = box.getMaximum();
	Vec3f vMin2 = Vec3f(vMin.x,vMin.y,vMin.z);
	Vec3f vMax2 = Vec3f(vMax.x,vMax.y,vMax.z);
	std::pair<Vec3f,Vec3f> ret(vMin2,vMax2);
	return ret;
}


}